using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;

namespace modelbuilder.parts
{
    public class XmlFileAdapter : IXmlFileAdapter
    {
        public void In_Process(IEnumerable<string> filenames) {
            Out_Result(Load(filenames));
        }

        private static IEnumerable<XDocument> Load(IEnumerable<string> filenames) {
            return filenames.Select(XDocument.Load);
        }

        public event Action<IEnumerable<XDocument>> Out_Result;
    }
}